// 获取元素
var pwd = document.getElementById("psw");
var flag = 0;//默认闭眼

//处理显示隐藏密码事件
eye.onclick = function(){
    if(flag==0){
        pwd.type = "text";//密码框切换成文本样式，显示密码
        $("#eye").attr("src","../imgs/psw02.png");//睁眼图片
        flag = 1;
    }else{
        pwd.type = "password";//文本框切换成密码框，隐藏密码
        $("#eye").attr("src","../imgs/psw01.png");//闭眼图片
        flag = 0;
    }
}
